package com.demo.annotation_c_other;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestMyBeanFactory {
    @Test
    public void test2(){
        String xmlPath="com/demo/annotation_c_other/beans.xml";
        ClassPathXmlApplicationContext applicationContext=new ClassPathXmlApplicationContext(xmlPath);
        UserService userService=applicationContext.getBean("userServiceId",UserService.class);
        UserService userService1=applicationContext.getBean("userServiceId",UserService.class);
        System.out.println(userService);
        System.out.println(userService1);
        applicationContext.close();
    }
}
